<template>
	<view>

		<view style="width: 100%; height: 300rpx;" class="top">
		</view>

		<uni-card  v-for="(item,index) in jiuyuanlist"  :index="index"  :key="index"  :is-shadow="false" is-full
			style="width: 90%; border-radius: 15rpx; margin: 10rpx 10rpx 20rpx 16rpx; position: relative; top: -300rpx;">
			
			<view style="display: flex; justify-content: space-between; align-items: center;">
				<view style="font-size: 35rpx; color: #AAC8FC;"  v-if="item.type==0">搭电</view>
				<view style="font-size: 35rpx; color: #AAC8FC;"  v-if="item.type==1">换胎</view>
				<view style="font-size: 35rpx; color: #AAC8FC;"  v-if="item.type==2">拖车</view>
				<view>{{item.rescueTime}}</view>

			</view>




			<view style="border-top: 10rpx solid #EEEEEE; margin-top: 10rpx;"></view>

			<view style="display: flex; height: 80rpx; align-items: center;">
				<view>{{item.address}}</view>

			</view>

		

		</uni-card>


















	</view>
</template>

<script>
	export default {
		data() {
			return {
				cheRescue:{
					
					userId:''
					
				},
				
				jiuyuanlist:'',
				
				
				

			}
		},
		
		
			onLoad() {
		this.getjiuyuandemo()	
		
		
		
		
		},
			
		
		
		methods: {
			
	
			
			
	

			getCookie(name) {
				const nameEQ = name + "=";
				const cookies = document.cookie.split(';');
				for (let i = 0; i < cookies.length; i++) {
					let c = cookies[i].trim();
					if (c.indexOf(nameEQ) === 0) {
						return decodeURIComponent(c.substring(nameEQ.length));
					}
				}
				return null;
			},
			
			
			getjiuyuandemo(){
				let that=this
				that.cheRescue.userId=that.getCookie('userid')
				this.$http({
					url:"api/rescue/rescue/list",
					method:"get",
					data:that.cheRescue,
					success(res){
						
						that.jiuyuanlist=res.data.rows
						
					}
					
					
					
				})
		
				
			}
			
			
			
			
			




		}
	}
</script>

<style>
	.top {
		width: 100%;
		height: 270rpx;
		background-color: #2f81fa;
	}
</style>